package com.libra.assemble.repository.authority;

import com.libra.assemble.entity.authority.Sidebar;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

/**
 * 侧边栏菜单信息的数据访问接口.
 *
 * @author Libra
 */
public interface SidebarDao extends PagingAndSortingRepository<Sidebar, Long>, JpaSpecificationExecutor<Sidebar> {

    /**
     * 获得所有顶级菜单信息(上级菜单为空).
     *
     * @return
     */
    List<Sidebar> findByPreSidebarIsNull();
}
